<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
  <head>
    <title>Code coverage for Tuho</title>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <script src='./assets/0.5.3/jquery-1.6.2.min.js' type='text/javascript'></script>
    <script src='./assets/0.5.3/jquery.dataTables.min.js' type='text/javascript'></script>   
    <script src='./assets/0.5.3/fancybox/jquery.fancybox-1.3.1.pack.js' type='text/javascript'></script>   
    <script src='./assets/0.5.3/jquery.timeago.js' type='text/javascript'></script>   
    <script src='./assets/0.5.3/jquery.url.js' type='text/javascript'></script>   
    <script src='./assets/0.5.3/highlight.pack.js' type='text/javascript'></script>  
    <script src='./assets/0.5.3/app.js' type='text/javascript'></script>    
    <link href='./assets/0.5.3/stylesheet.css' media='screen, projection, print' rel='stylesheet' type='text/css'>
    <link href='./assets/0.5.3/highlight.css' media='screen, projection, print' rel='stylesheet' type='text/css'>
    <link href='./assets/0.5.3/fancybox/jquery.fancybox-1.3.1.css' media='screen, projection, print' rel='stylesheet' type='text/css'>
    <link href='./assets/0.5.3/smoothness/jquery-ui-1.8.4.custom.css' media='screen, projection, print' rel='stylesheet' type='text/css'>    
    <link rel="shortcut icon" type="image/png" href="./assets/0.5.3/favicon_green.png" />
    <link rel="icon" type="image/png" href="./assets/0.5.3/favicon.png" />
  </head>
  
  <body>
    <div id="loading">
      <img src="./assets/0.5.3/loading.gif" alt="loading"/>
    </div>
    <div id="wrapper" style="display:none;">
      <div class="timestamp">Generated <abbr class="timeago" title="2012-06-20T16:16:19+03:00">2012-06-20T16:16:19+03:00</abbr></div>
      <ul class="group_tabs"></ul>

      <div id="content">
        <div class="file_list_container" id="AllFiles">
  <h2>
    <span class="group_name">All Files</span>
    (<span class="covered_percent"><span class="green">100.0%</span></span>
     covered at
     <span class="covered_strength">
       <span class="green">
         1.43
       </span>
    </span> hits/line)
  </h2>
  <a name="AllFiles"></a>
  <div>
    <b>34</b> files in total.
    <b>217</b> relevant lines. 
    <span class="green"><b>217</b> lines covered</span> and
    <span class="red"><b>0</b> lines missed </span>
  </div>
  <table class="file_list">
    <thead>
      <tr>
        <th>File</th>
        <th>% covered</th>
        <th>Lines</th>
        <th>Relevant Lines</th>
        <th>Lines covered</th>
        <th>Lines missed</th>
        <th>Avg. Hits / Line</th>
      </tr>
    </thead>
    <tbody>
      
      <tr>
        <td class="strong"><a href="#66007273b5e225be7b4c0af93e9e8308650582a3" class="src_link" title="app/controllers/application_controller.rb">app/controllers/application_controller.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>21</td>
        <td>8</td>
        <td>8</td>
        <td>0</td>
        <td>8.9</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#88433b36edcb60747238efd703edfaa310faeab7" class="src_link" title="app/controllers/counties_controller.rb">app/controllers/counties_controller.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>13</td>
        <td>6</td>
        <td>6</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#576c784c37a279fe0d1429b77f36b8fb6ce531fe" class="src_link" title="app/controllers/greater_areas_controller.rb">app/controllers/greater_areas_controller.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>13</td>
        <td>6</td>
        <td>6</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#7ddbfbc0f74c000e48cec57ee03634582790530c" class="src_link" title="app/controllers/language_majorities_controller.rb">app/controllers/language_majorities_controller.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>12</td>
        <td>6</td>
        <td>6</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#3eadf97faa1a7612bf1b9986d06d95486f6f7c64" class="src_link" title="app/controllers/language_officialities_controller.rb">app/controllers/language_officialities_controller.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>12</td>
        <td>6</td>
        <td>6</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#abdfe29d0af61e066d9c6e0ec73e225b7081a7ea" class="src_link" title="app/controllers/languages_controller.rb">app/controllers/languages_controller.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>13</td>
        <td>6</td>
        <td>6</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#41c8d793d290c5af9a4430e421ff1354adffcd5e" class="src_link" title="app/controllers/location_type_groups_controller.rb">app/controllers/location_type_groups_controller.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>13</td>
        <td>6</td>
        <td>6</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#8cd9e68d74b0c82024340e19c1e145ecd404680e" class="src_link" title="app/controllers/location_type_subgroups_controller.rb">app/controllers/location_type_subgroups_controller.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>13</td>
        <td>6</td>
        <td>6</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#356c7a017165884cd78d046492eac7735ab84389" class="src_link" title="app/controllers/location_types_controller.rb">app/controllers/location_types_controller.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>13</td>
        <td>6</td>
        <td>6</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#0fe81f1109d9c06caa101b52c34515a95959dd88" class="src_link" title="app/controllers/locations_controller.rb">app/controllers/locations_controller.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>21</td>
        <td>9</td>
        <td>9</td>
        <td>0</td>
        <td>1.3</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#1a19effb67d18d2ee4be73fd2277a27c6e98fb79" class="src_link" title="app/controllers/map_controller.rb">app/controllers/map_controller.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>52</td>
        <td>16</td>
        <td>16</td>
        <td>0</td>
        <td>1.4</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#357a9666e5febe46d69575f07212eee8368db205" class="src_link" title="app/controllers/municipalities_controller.rb">app/controllers/municipalities_controller.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>13</td>
        <td>6</td>
        <td>6</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#f86083fd2a6b29b918f81292ea2dedbfd9ea652d" class="src_link" title="app/controllers/provinces_controller.rb">app/controllers/provinces_controller.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>13</td>
        <td>6</td>
        <td>6</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#6fc2142f0ce298ac8f0c142183bf04f3983dd222" class="src_link" title="app/controllers/regions_controller.rb">app/controllers/regions_controller.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>13</td>
        <td>6</td>
        <td>6</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#442279855a6add3cf52a99f66dfdf647d2ddcaa7" class="src_link" title="app/controllers/scale_relevancies_controller.rb">app/controllers/scale_relevancies_controller.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>13</td>
        <td>6</td>
        <td>6</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#420c5d1318edace5720992d9fb98b1b65c3689c0" class="src_link" title="app/controllers/users_controller.rb">app/controllers/users_controller.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>38</td>
        <td>15</td>
        <td>15</td>
        <td>0</td>
        <td>2.1</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#b6faa01126cef4f4f053178ad236af92069a8e56" class="src_link" title="app/helpers/application_helper.rb">app/helpers/application_helper.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>2</td>
        <td>1</td>
        <td>1</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#c7ab2a10e1adfaae530850570c7be0829df73a61" class="src_link" title="app/helpers/map_helper.rb">app/helpers/map_helper.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>2</td>
        <td>1</td>
        <td>1</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#4882085e53b7c5993f10349d12875ef49c07c3a5" class="src_link" title="app/helpers/users_helper.rb">app/helpers/users_helper.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>2</td>
        <td>1</td>
        <td>1</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#6637756de2289dfe4b5c617b7e476d044d4d3eec" class="src_link" title="app/models/county.rb">app/models/county.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>10</td>
        <td>5</td>
        <td>5</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#441212cc5ddbc88fe358f58e08d4eabcd45861db" class="src_link" title="app/models/greater_area.rb">app/models/greater_area.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>10</td>
        <td>5</td>
        <td>5</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#9488a79c83eba99ceae78a6f66047493b047cd1d" class="src_link" title="app/models/language.rb">app/models/language.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>10</td>
        <td>5</td>
        <td>5</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#8b76b2e472f39404243fea1999cee6174931a274" class="src_link" title="app/models/language_majority.rb">app/models/language_majority.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>10</td>
        <td>5</td>
        <td>5</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#d0cdde89986ca41d4061d273ae616a243fe2b833" class="src_link" title="app/models/language_officiality.rb">app/models/language_officiality.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>10</td>
        <td>5</td>
        <td>5</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#26289cb96c18dc2d5ce9f6559610aa347b0ef2d8" class="src_link" title="app/models/location.rb">app/models/location.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>25</td>
        <td>9</td>
        <td>9</td>
        <td>0</td>
        <td>4.9</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#c8db459fd16571c7df5d8f3af0fead28000d11c3" class="src_link" title="app/models/location_type.rb">app/models/location_type.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>10</td>
        <td>5</td>
        <td>5</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#c816078b8b2c3b22e03c12760ca5089df05311b1" class="src_link" title="app/models/location_type_group.rb">app/models/location_type_group.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>10</td>
        <td>5</td>
        <td>5</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#4eeddf60b977df42c4ec0353ac1e07411dc146ed" class="src_link" title="app/models/location_type_subgroup.rb">app/models/location_type_subgroup.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>10</td>
        <td>5</td>
        <td>5</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#de9ee54134becfe613708d23505bfcd50f5e4d95" class="src_link" title="app/models/map.rb">app/models/map.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>62</td>
        <td>15</td>
        <td>15</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#0c2e40bace65ed582a0f5c29fe039448fcff4542" class="src_link" title="app/models/municipality.rb">app/models/municipality.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>10</td>
        <td>5</td>
        <td>5</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#1b68e1432eb8c7765e109dca1a4ace8f81d08689" class="src_link" title="app/models/province.rb">app/models/province.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>10</td>
        <td>5</td>
        <td>5</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#e449a24e183afe417626f0aedd413b8f74456e53" class="src_link" title="app/models/region.rb">app/models/region.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>10</td>
        <td>5</td>
        <td>5</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#8e2fad185843a091104ef1f41b1a0f49996def29" class="src_link" title="app/models/scale_relevancy.rb">app/models/scale_relevancy.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>10</td>
        <td>5</td>
        <td>5</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#733426f752dece529402c33273bc15d991cdacd4" class="src_link" title="app/models/user.rb">app/models/user.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>28</td>
        <td>10</td>
        <td>10</td>
        <td>0</td>
        <td>1.9</td>
      </tr>
      
    </tbody>
  </table>
</div>


        
          <div class="file_list_container" id="Controllers">
  <h2>
    <span class="group_name">Controllers</span>
    (<span class="covered_percent"><span class="green">100.0%</span></span>
     covered at
     <span class="covered_strength">
       <span class="green">
         1.61
       </span>
    </span> hits/line)
  </h2>
  <a name="Controllers"></a>
  <div>
    <b>16</b> files in total.
    <b>120</b> relevant lines. 
    <span class="green"><b>120</b> lines covered</span> and
    <span class="red"><b>0</b> lines missed </span>
  </div>
  <table class="file_list">
    <thead>
      <tr>
        <th>File</th>
        <th>% covered</th>
        <th>Lines</th>
        <th>Relevant Lines</th>
        <th>Lines covered</th>
        <th>Lines missed</th>
        <th>Avg. Hits / Line</th>
      </tr>
    </thead>
    <tbody>
      
      <tr>
        <td class="strong"><a href="#66007273b5e225be7b4c0af93e9e8308650582a3" class="src_link" title="app/controllers/application_controller.rb">app/controllers/application_controller.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>21</td>
        <td>8</td>
        <td>8</td>
        <td>0</td>
        <td>8.9</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#88433b36edcb60747238efd703edfaa310faeab7" class="src_link" title="app/controllers/counties_controller.rb">app/controllers/counties_controller.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>13</td>
        <td>6</td>
        <td>6</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#576c784c37a279fe0d1429b77f36b8fb6ce531fe" class="src_link" title="app/controllers/greater_areas_controller.rb">app/controllers/greater_areas_controller.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>13</td>
        <td>6</td>
        <td>6</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#7ddbfbc0f74c000e48cec57ee03634582790530c" class="src_link" title="app/controllers/language_majorities_controller.rb">app/controllers/language_majorities_controller.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>12</td>
        <td>6</td>
        <td>6</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#3eadf97faa1a7612bf1b9986d06d95486f6f7c64" class="src_link" title="app/controllers/language_officialities_controller.rb">app/controllers/language_officialities_controller.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>12</td>
        <td>6</td>
        <td>6</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#abdfe29d0af61e066d9c6e0ec73e225b7081a7ea" class="src_link" title="app/controllers/languages_controller.rb">app/controllers/languages_controller.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>13</td>
        <td>6</td>
        <td>6</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#41c8d793d290c5af9a4430e421ff1354adffcd5e" class="src_link" title="app/controllers/location_type_groups_controller.rb">app/controllers/location_type_groups_controller.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>13</td>
        <td>6</td>
        <td>6</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#8cd9e68d74b0c82024340e19c1e145ecd404680e" class="src_link" title="app/controllers/location_type_subgroups_controller.rb">app/controllers/location_type_subgroups_controller.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>13</td>
        <td>6</td>
        <td>6</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#356c7a017165884cd78d046492eac7735ab84389" class="src_link" title="app/controllers/location_types_controller.rb">app/controllers/location_types_controller.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>13</td>
        <td>6</td>
        <td>6</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#0fe81f1109d9c06caa101b52c34515a95959dd88" class="src_link" title="app/controllers/locations_controller.rb">app/controllers/locations_controller.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>21</td>
        <td>9</td>
        <td>9</td>
        <td>0</td>
        <td>1.3</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#1a19effb67d18d2ee4be73fd2277a27c6e98fb79" class="src_link" title="app/controllers/map_controller.rb">app/controllers/map_controller.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>52</td>
        <td>16</td>
        <td>16</td>
        <td>0</td>
        <td>1.4</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#357a9666e5febe46d69575f07212eee8368db205" class="src_link" title="app/controllers/municipalities_controller.rb">app/controllers/municipalities_controller.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>13</td>
        <td>6</td>
        <td>6</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#f86083fd2a6b29b918f81292ea2dedbfd9ea652d" class="src_link" title="app/controllers/provinces_controller.rb">app/controllers/provinces_controller.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>13</td>
        <td>6</td>
        <td>6</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#6fc2142f0ce298ac8f0c142183bf04f3983dd222" class="src_link" title="app/controllers/regions_controller.rb">app/controllers/regions_controller.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>13</td>
        <td>6</td>
        <td>6</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#442279855a6add3cf52a99f66dfdf647d2ddcaa7" class="src_link" title="app/controllers/scale_relevancies_controller.rb">app/controllers/scale_relevancies_controller.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>13</td>
        <td>6</td>
        <td>6</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#420c5d1318edace5720992d9fb98b1b65c3689c0" class="src_link" title="app/controllers/users_controller.rb">app/controllers/users_controller.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>38</td>
        <td>15</td>
        <td>15</td>
        <td>0</td>
        <td>2.1</td>
      </tr>
      
    </tbody>
  </table>
</div>

        
          <div class="file_list_container" id="Models">
  <h2>
    <span class="group_name">Models</span>
    (<span class="covered_percent"><span class="green">100.0%</span></span>
     covered at
     <span class="covered_strength">
       <span class="green">
         1.32
       </span>
    </span> hits/line)
  </h2>
  <a name="Models"></a>
  <div>
    <b>15</b> files in total.
    <b>94</b> relevant lines. 
    <span class="green"><b>94</b> lines covered</span> and
    <span class="red"><b>0</b> lines missed </span>
  </div>
  <table class="file_list">
    <thead>
      <tr>
        <th>File</th>
        <th>% covered</th>
        <th>Lines</th>
        <th>Relevant Lines</th>
        <th>Lines covered</th>
        <th>Lines missed</th>
        <th>Avg. Hits / Line</th>
      </tr>
    </thead>
    <tbody>
      
      <tr>
        <td class="strong"><a href="#6637756de2289dfe4b5c617b7e476d044d4d3eec" class="src_link" title="app/models/county.rb">app/models/county.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>10</td>
        <td>5</td>
        <td>5</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#441212cc5ddbc88fe358f58e08d4eabcd45861db" class="src_link" title="app/models/greater_area.rb">app/models/greater_area.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>10</td>
        <td>5</td>
        <td>5</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#9488a79c83eba99ceae78a6f66047493b047cd1d" class="src_link" title="app/models/language.rb">app/models/language.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>10</td>
        <td>5</td>
        <td>5</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#8b76b2e472f39404243fea1999cee6174931a274" class="src_link" title="app/models/language_majority.rb">app/models/language_majority.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>10</td>
        <td>5</td>
        <td>5</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#d0cdde89986ca41d4061d273ae616a243fe2b833" class="src_link" title="app/models/language_officiality.rb">app/models/language_officiality.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>10</td>
        <td>5</td>
        <td>5</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#26289cb96c18dc2d5ce9f6559610aa347b0ef2d8" class="src_link" title="app/models/location.rb">app/models/location.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>25</td>
        <td>9</td>
        <td>9</td>
        <td>0</td>
        <td>4.9</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#c8db459fd16571c7df5d8f3af0fead28000d11c3" class="src_link" title="app/models/location_type.rb">app/models/location_type.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>10</td>
        <td>5</td>
        <td>5</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#c816078b8b2c3b22e03c12760ca5089df05311b1" class="src_link" title="app/models/location_type_group.rb">app/models/location_type_group.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>10</td>
        <td>5</td>
        <td>5</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#4eeddf60b977df42c4ec0353ac1e07411dc146ed" class="src_link" title="app/models/location_type_subgroup.rb">app/models/location_type_subgroup.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>10</td>
        <td>5</td>
        <td>5</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#de9ee54134becfe613708d23505bfcd50f5e4d95" class="src_link" title="app/models/map.rb">app/models/map.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>62</td>
        <td>15</td>
        <td>15</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#0c2e40bace65ed582a0f5c29fe039448fcff4542" class="src_link" title="app/models/municipality.rb">app/models/municipality.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>10</td>
        <td>5</td>
        <td>5</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#1b68e1432eb8c7765e109dca1a4ace8f81d08689" class="src_link" title="app/models/province.rb">app/models/province.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>10</td>
        <td>5</td>
        <td>5</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#e449a24e183afe417626f0aedd413b8f74456e53" class="src_link" title="app/models/region.rb">app/models/region.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>10</td>
        <td>5</td>
        <td>5</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#8e2fad185843a091104ef1f41b1a0f49996def29" class="src_link" title="app/models/scale_relevancy.rb">app/models/scale_relevancy.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>10</td>
        <td>5</td>
        <td>5</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#733426f752dece529402c33273bc15d991cdacd4" class="src_link" title="app/models/user.rb">app/models/user.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>28</td>
        <td>10</td>
        <td>10</td>
        <td>0</td>
        <td>1.9</td>
      </tr>
      
    </tbody>
  </table>
</div>

        
          <div class="file_list_container" id="Mailers">
  <h2>
    <span class="group_name">Mailers</span>
    (<span class="covered_percent"><span class="green">100.0%</span></span>
     covered at
     <span class="covered_strength">
       <span class="red">
         0.0
       </span>
    </span> hits/line)
  </h2>
  <a name="Mailers"></a>
  <div>
    <b>0</b> files in total.
    <b>0.0</b> relevant lines. 
    <span class="green"><b>0.0</b> lines covered</span> and
    <span class="red"><b>0.0</b> lines missed </span>
  </div>
  <table class="file_list">
    <thead>
      <tr>
        <th>File</th>
        <th>% covered</th>
        <th>Lines</th>
        <th>Relevant Lines</th>
        <th>Lines covered</th>
        <th>Lines missed</th>
        <th>Avg. Hits / Line</th>
      </tr>
    </thead>
    <tbody>
      
    </tbody>
  </table>
</div>

        
          <div class="file_list_container" id="Helpers">
  <h2>
    <span class="group_name">Helpers</span>
    (<span class="covered_percent"><span class="green">100.0%</span></span>
     covered at
     <span class="covered_strength">
       <span class="yellow">
         1.0
       </span>
    </span> hits/line)
  </h2>
  <a name="Helpers"></a>
  <div>
    <b>3</b> files in total.
    <b>3</b> relevant lines. 
    <span class="green"><b>3</b> lines covered</span> and
    <span class="red"><b>0</b> lines missed </span>
  </div>
  <table class="file_list">
    <thead>
      <tr>
        <th>File</th>
        <th>% covered</th>
        <th>Lines</th>
        <th>Relevant Lines</th>
        <th>Lines covered</th>
        <th>Lines missed</th>
        <th>Avg. Hits / Line</th>
      </tr>
    </thead>
    <tbody>
      
      <tr>
        <td class="strong"><a href="#b6faa01126cef4f4f053178ad236af92069a8e56" class="src_link" title="app/helpers/application_helper.rb">app/helpers/application_helper.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>2</td>
        <td>1</td>
        <td>1</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#c7ab2a10e1adfaae530850570c7be0829df73a61" class="src_link" title="app/helpers/map_helper.rb">app/helpers/map_helper.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>2</td>
        <td>1</td>
        <td>1</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
      <tr>
        <td class="strong"><a href="#4882085e53b7c5993f10349d12875ef49c07c3a5" class="src_link" title="app/helpers/users_helper.rb">app/helpers/users_helper.rb</a></td>
        <td class="green strong">100.0 %</td>
        <td>2</td>
        <td>1</td>
        <td>1</td>
        <td>0</td>
        <td>1.0</td>
      </tr>
      
    </tbody>
  </table>
</div>

        
          <div class="file_list_container" id="Libraries">
  <h2>
    <span class="group_name">Libraries</span>
    (<span class="covered_percent"><span class="green">100.0%</span></span>
     covered at
     <span class="covered_strength">
       <span class="red">
         0.0
       </span>
    </span> hits/line)
  </h2>
  <a name="Libraries"></a>
  <div>
    <b>0</b> files in total.
    <b>0.0</b> relevant lines. 
    <span class="green"><b>0.0</b> lines covered</span> and
    <span class="red"><b>0.0</b> lines missed </span>
  </div>
  <table class="file_list">
    <thead>
      <tr>
        <th>File</th>
        <th>% covered</th>
        <th>Lines</th>
        <th>Relevant Lines</th>
        <th>Lines covered</th>
        <th>Lines missed</th>
        <th>Avg. Hits / Line</th>
      </tr>
    </thead>
    <tbody>
      
    </tbody>
  </table>
</div>

        
          <div class="file_list_container" id="Plugins">
  <h2>
    <span class="group_name">Plugins</span>
    (<span class="covered_percent"><span class="green">100.0%</span></span>
     covered at
     <span class="covered_strength">
       <span class="red">
         0.0
       </span>
    </span> hits/line)
  </h2>
  <a name="Plugins"></a>
  <div>
    <b>0</b> files in total.
    <b>0.0</b> relevant lines. 
    <span class="green"><b>0.0</b> lines covered</span> and
    <span class="red"><b>0.0</b> lines missed </span>
  </div>
  <table class="file_list">
    <thead>
      <tr>
        <th>File</th>
        <th>% covered</th>
        <th>Lines</th>
        <th>Relevant Lines</th>
        <th>Lines covered</th>
        <th>Lines missed</th>
        <th>Avg. Hits / Line</th>
      </tr>
    </thead>
    <tbody>
      
    </tbody>
  </table>
</div>

        
      </div>
    
      <div id="footer">
        Generated by <a href="http://github.com/colszowka/simplecov">simplecov</a> v0.6.4 
        and simplecov-html v0.5.3<br/>
        using RSpec
      </div>
    
      <div class="source_files">
      
        <div class="source_table" id="66007273b5e225be7b4c0af93e9e8308650582a3">
  <div class="header">
    <h3>app/controllers/application_controller.rb</h3>
    <h4><span class="green">100.0 %</span> covered</h4>
    <div>
      <b>8</b> relevant lines. 
      <span class="green"><b>8</b> lines covered</span> and
      <span class="red"><b>0</b> lines missed.</span>
    </div>
  </div>
  
  <pre>
    <ol>
      
        <li class="never" data-hits="" data-linenumber="1">
          
          
          <code class="ruby"># encoding: utf-8</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="2">
          <span class="hits">1</span>
          
          <code class="ruby">class ApplicationController &lt; ActionController::Base</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="3">
          <span class="hits">1</span>
          
          <code class="ruby">  protect_from_forgery</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="4">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="5">
          
          
          <code class="ruby">  # Method that checks if the user is logged in</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="6">
          
          
          <code class="ruby">  #</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="7">
          
          
          <code class="ruby">  # * *Returns* :</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="8">
          
          
          <code class="ruby">  #   - true if session[:user] exists and the user is logged in</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="9">
          
          
          <code class="ruby">  #   - false if user is not logged in</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="10">
          
          
          <code class="ruby">  #</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="11">
          <span class="hits">1</span>
          
          <code class="ruby">  def login_required</code>
        </li>
      
        <li class="covered" data-hits="32" data-linenumber="12">
          <span class="hits">32</span>
          
          <code class="ruby">    if session[:user]</code>
        </li>
      
        <li class="covered" data-hits="30" data-linenumber="13">
          <span class="hits">30</span>
          
          <code class="ruby">      return true</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="14">
          
          
          <code class="ruby">    else</code>
        </li>
      
        <li class="covered" data-hits="2" data-linenumber="15">
          <span class="hits">2</span>
          
          <code class="ruby">      flash[:warning] = 'Kirjaudu sisään jatkaaksesi'</code>
        </li>
      
        <li class="covered" data-hits="2" data-linenumber="16">
          <span class="hits">2</span>
          
          <code class="ruby">      redirect_to :controller =&gt; 'users', :action =&gt; 'login'</code>
        </li>
      
        <li class="covered" data-hits="2" data-linenumber="17">
          <span class="hits">2</span>
          
          <code class="ruby">      return false</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="18">
          
          
          <code class="ruby">    end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="19">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="20">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="21">
          
          
          <code class="ruby">end</code>
        </li>
      
    </ol>
  </pre>
</div>
      
        <div class="source_table" id="88433b36edcb60747238efd703edfaa310faeab7">
  <div class="header">
    <h3>app/controllers/counties_controller.rb</h3>
    <h4><span class="green">100.0 %</span> covered</h4>
    <div>
      <b>6</b> relevant lines. 
      <span class="green"><b>6</b> lines covered</span> and
      <span class="red"><b>0</b> lines missed.</span>
    </div>
  </div>
  
  <pre>
    <ol>
      
        <li class="never" data-hits="" data-linenumber="1">
          
          
          <code class="ruby"># encoding: utf-8</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="2">
          <span class="hits">1</span>
          
          <code class="ruby">class CountiesController &lt; ApplicationController</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="3">
          <span class="hits">1</span>
          
          <code class="ruby">  before_filter :login_required</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="4">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="5">
          <span class="hits">1</span>
          
          <code class="ruby">  def index</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="6">
          <span class="hits">1</span>
          
          <code class="ruby">    render :json =&gt; County.find(:all)</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="7">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="8">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="9">
          <span class="hits">1</span>
          
          <code class="ruby">  def show</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="10">
          <span class="hits">1</span>
          
          <code class="ruby">    render :json =&gt; County.find_by_code(params[:code])</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="11">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="12">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="13">
          
          
          <code class="ruby">end</code>
        </li>
      
    </ol>
  </pre>
</div>
      
        <div class="source_table" id="576c784c37a279fe0d1429b77f36b8fb6ce531fe">
  <div class="header">
    <h3>app/controllers/greater_areas_controller.rb</h3>
    <h4><span class="green">100.0 %</span> covered</h4>
    <div>
      <b>6</b> relevant lines. 
      <span class="green"><b>6</b> lines covered</span> and
      <span class="red"><b>0</b> lines missed.</span>
    </div>
  </div>
  
  <pre>
    <ol>
      
        <li class="never" data-hits="" data-linenumber="1">
          
          
          <code class="ruby"># encoding: utf-8</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="2">
          <span class="hits">1</span>
          
          <code class="ruby">class GreaterAreasController &lt; ApplicationController</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="3">
          <span class="hits">1</span>
          
          <code class="ruby">  before_filter :login_required</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="4">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="5">
          <span class="hits">1</span>
          
          <code class="ruby">  def index</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="6">
          <span class="hits">1</span>
          
          <code class="ruby">    render :json =&gt; GreaterArea.find(:all)</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="7">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="8">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="9">
          <span class="hits">1</span>
          
          <code class="ruby">  def show</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="10">
          <span class="hits">1</span>
          
          <code class="ruby">    render :json =&gt; GreaterArea.find_by_code(params[:code])</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="11">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="12">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="13">
          
          
          <code class="ruby">end</code>
        </li>
      
    </ol>
  </pre>
</div>
      
        <div class="source_table" id="7ddbfbc0f74c000e48cec57ee03634582790530c">
  <div class="header">
    <h3>app/controllers/language_majorities_controller.rb</h3>
    <h4><span class="green">100.0 %</span> covered</h4>
    <div>
      <b>6</b> relevant lines. 
      <span class="green"><b>6</b> lines covered</span> and
      <span class="red"><b>0</b> lines missed.</span>
    </div>
  </div>
  
  <pre>
    <ol>
      
        <li class="never" data-hits="" data-linenumber="1">
          
          
          <code class="ruby"># encoding: utf-8</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="2">
          <span class="hits">1</span>
          
          <code class="ruby">class LanguageMajoritiesController &lt; ApplicationController</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="3">
          <span class="hits">1</span>
          
          <code class="ruby">  before_filter :login_required</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="4">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="5">
          <span class="hits">1</span>
          
          <code class="ruby">  def index</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="6">
          <span class="hits">1</span>
          
          <code class="ruby">    render :json =&gt; LanguageMajority.find(:all)</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="7">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="8">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="9">
          <span class="hits">1</span>
          
          <code class="ruby">  def show</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="10">
          <span class="hits">1</span>
          
          <code class="ruby">    render :json =&gt; LanguageMajority.find_by_code(params[:code])</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="11">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="12">
          
          
          <code class="ruby">end</code>
        </li>
      
    </ol>
  </pre>
</div>
      
        <div class="source_table" id="3eadf97faa1a7612bf1b9986d06d95486f6f7c64">
  <div class="header">
    <h3>app/controllers/language_officialities_controller.rb</h3>
    <h4><span class="green">100.0 %</span> covered</h4>
    <div>
      <b>6</b> relevant lines. 
      <span class="green"><b>6</b> lines covered</span> and
      <span class="red"><b>0</b> lines missed.</span>
    </div>
  </div>
  
  <pre>
    <ol>
      
        <li class="never" data-hits="" data-linenumber="1">
          
          
          <code class="ruby"># encoding: utf-8</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="2">
          <span class="hits">1</span>
          
          <code class="ruby">class LanguageOfficialitiesController &lt; ApplicationController</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="3">
          <span class="hits">1</span>
          
          <code class="ruby">  before_filter :login_required</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="4">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="5">
          <span class="hits">1</span>
          
          <code class="ruby">  def index</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="6">
          <span class="hits">1</span>
          
          <code class="ruby">    render :json =&gt; LanguageOfficiality.find(:all)</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="7">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="8">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="9">
          <span class="hits">1</span>
          
          <code class="ruby">  def show</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="10">
          <span class="hits">1</span>
          
          <code class="ruby">    render :json =&gt; LanguageOfficiality.find_by_code(params[:code])</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="11">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="12">
          
          
          <code class="ruby">end</code>
        </li>
      
    </ol>
  </pre>
</div>
      
        <div class="source_table" id="abdfe29d0af61e066d9c6e0ec73e225b7081a7ea">
  <div class="header">
    <h3>app/controllers/languages_controller.rb</h3>
    <h4><span class="green">100.0 %</span> covered</h4>
    <div>
      <b>6</b> relevant lines. 
      <span class="green"><b>6</b> lines covered</span> and
      <span class="red"><b>0</b> lines missed.</span>
    </div>
  </div>
  
  <pre>
    <ol>
      
        <li class="never" data-hits="" data-linenumber="1">
          
          
          <code class="ruby"># encoding: utf-8</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="2">
          <span class="hits">1</span>
          
          <code class="ruby">class LanguagesController &lt; ApplicationController</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="3">
          <span class="hits">1</span>
          
          <code class="ruby">  before_filter :login_required</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="4">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="5">
          <span class="hits">1</span>
          
          <code class="ruby">  def index</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="6">
          <span class="hits">1</span>
          
          <code class="ruby">    render :json =&gt; Language.find(:all)</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="7">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="8">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="9">
          <span class="hits">1</span>
          
          <code class="ruby">  def show</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="10">
          <span class="hits">1</span>
          
          <code class="ruby">    render :json =&gt; Language.find_by_code(params[:code])</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="11">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="12">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="13">
          
          
          <code class="ruby">end</code>
        </li>
      
    </ol>
  </pre>
</div>
      
        <div class="source_table" id="41c8d793d290c5af9a4430e421ff1354adffcd5e">
  <div class="header">
    <h3>app/controllers/location_type_groups_controller.rb</h3>
    <h4><span class="green">100.0 %</span> covered</h4>
    <div>
      <b>6</b> relevant lines. 
      <span class="green"><b>6</b> lines covered</span> and
      <span class="red"><b>0</b> lines missed.</span>
    </div>
  </div>
  
  <pre>
    <ol>
      
        <li class="never" data-hits="" data-linenumber="1">
          
          
          <code class="ruby"># encoding: utf-8</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="2">
          <span class="hits">1</span>
          
          <code class="ruby">class LocationTypeGroupsController &lt; ApplicationController</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="3">
          <span class="hits">1</span>
          
          <code class="ruby">  before_filter :login_required</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="4">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="5">
          <span class="hits">1</span>
          
          <code class="ruby">  def index</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="6">
          <span class="hits">1</span>
          
          <code class="ruby">    render :json =&gt; LocationTypeGroup.find(:all)</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="7">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="8">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="9">
          <span class="hits">1</span>
          
          <code class="ruby">  def show</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="10">
          <span class="hits">1</span>
          
          <code class="ruby">    render :json =&gt; LocationTypeGroup.find_by_code(params[:code])</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="11">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="12">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="13">
          
          
          <code class="ruby">end</code>
        </li>
      
    </ol>
  </pre>
</div>
      
        <div class="source_table" id="8cd9e68d74b0c82024340e19c1e145ecd404680e">
  <div class="header">
    <h3>app/controllers/location_type_subgroups_controller.rb</h3>
    <h4><span class="green">100.0 %</span> covered</h4>
    <div>
      <b>6</b> relevant lines. 
      <span class="green"><b>6</b> lines covered</span> and
      <span class="red"><b>0</b> lines missed.</span>
    </div>
  </div>
  
  <pre>
    <ol>
      
        <li class="never" data-hits="" data-linenumber="1">
          
          
          <code class="ruby"># encoding: utf-8</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="2">
          <span class="hits">1</span>
          
          <code class="ruby">class LocationTypeSubgroupsController &lt; ApplicationController</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="3">
          <span class="hits">1</span>
          
          <code class="ruby">  before_filter :login_required</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="4">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="5">
          <span class="hits">1</span>
          
          <code class="ruby">  def index</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="6">
          <span class="hits">1</span>
          
          <code class="ruby">    render :json =&gt; LocationTypeSubgroup.find(:all)</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="7">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="8">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="9">
          <span class="hits">1</span>
          
          <code class="ruby">  def show</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="10">
          <span class="hits">1</span>
          
          <code class="ruby">    render :json =&gt; LocationTypeSubgroup.find_by_code(params[:code])</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="11">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="12">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="13">
          
          
          <code class="ruby">end</code>
        </li>
      
    </ol>
  </pre>
</div>
      
        <div class="source_table" id="356c7a017165884cd78d046492eac7735ab84389">
  <div class="header">
    <h3>app/controllers/location_types_controller.rb</h3>
    <h4><span class="green">100.0 %</span> covered</h4>
    <div>
      <b>6</b> relevant lines. 
      <span class="green"><b>6</b> lines covered</span> and
      <span class="red"><b>0</b> lines missed.</span>
    </div>
  </div>
  
  <pre>
    <ol>
      
        <li class="never" data-hits="" data-linenumber="1">
          
          
          <code class="ruby"># encoding: utf-8</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="2">
          <span class="hits">1</span>
          
          <code class="ruby">class LocationTypesController &lt; ApplicationController</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="3">
          <span class="hits">1</span>
          
          <code class="ruby">  before_filter :login_required</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="4">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="5">
          <span class="hits">1</span>
          
          <code class="ruby">  def index</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="6">
          <span class="hits">1</span>
          
          <code class="ruby">    render :json =&gt; LocationType.find(:all)</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="7">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="8">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="9">
          <span class="hits">1</span>
          
          <code class="ruby">  def show</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="10">
          <span class="hits">1</span>
          
          <code class="ruby">    render :json =&gt; LocationType.find_by_code(params[:code])</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="11">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="12">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="13">
          
          
          <code class="ruby">end</code>
        </li>
      
    </ol>
  </pre>
</div>
      
        <div class="source_table" id="0fe81f1109d9c06caa101b52c34515a95959dd88">
  <div class="header">
    <h3>app/controllers/locations_controller.rb</h3>
    <h4><span class="green">100.0 %</span> covered</h4>
    <div>
      <b>9</b> relevant lines. 
      <span class="green"><b>9</b> lines covered</span> and
      <span class="red"><b>0</b> lines missed.</span>
    </div>
  </div>
  
  <pre>
    <ol>
      
        <li class="never" data-hits="" data-linenumber="1">
          
          
          <code class="ruby"># encoding: utf-8</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="2">
          <span class="hits">1</span>
          
          <code class="ruby">class LocationsController &lt; ApplicationController</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="3">
          <span class="hits">1</span>
          
          <code class="ruby">  before_filter :login_required</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="4">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="5">
          
          
          <code class="ruby">  # locations_controller method that returns the ajax search results in json format</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="6">
          
          
          <code class="ruby">  #</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="7">
          <span class="hits">1</span>
          
          <code class="ruby">  def search</code>
        </li>
      
        <li class="covered" data-hits="2" data-linenumber="8">
          <span class="hits">2</span>
          
          <code class="ruby">    @results = Location.search(&quot;*&quot;+params[:term]+&quot;*&quot;)</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="9">
          
          
          <code class="ruby">    </code>
        </li>
      
        <li class="covered" data-hits="2" data-linenumber="10">
          <span class="hits">2</span>
          
          <code class="ruby">    respond_to do |format|</code>
        </li>
      
        <li class="covered" data-hits="2" data-linenumber="11">
          <span class="hits">2</span>
          
          <code class="ruby">      format.json do</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="12">
          <span class="hits">1</span>
          
          <code class="ruby">        @results.map! do |loc|</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="13">
          
          
          <code class="ruby">          {</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="14">
          
          
          <code class="ruby">            :value =&gt; loc.name</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="15">
          <span class="hits">1</span>
          
          <code class="ruby">          }</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="16">
          
          
          <code class="ruby">        end</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="17">
          <span class="hits">1</span>
          
          <code class="ruby">        render :json =&gt; @results</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="18">
          
          
          <code class="ruby">      end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="19">
          
          
          <code class="ruby">    end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="20">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="21">
          
          
          <code class="ruby">end</code>
        </li>
      
    </ol>
  </pre>
</div>
      
        <div class="source_table" id="1a19effb67d18d2ee4be73fd2277a27c6e98fb79">
  <div class="header">
    <h3>app/controllers/map_controller.rb</h3>
    <h4><span class="green">100.0 %</span> covered</h4>
    <div>
      <b>16</b> relevant lines. 
      <span class="green"><b>16</b> lines covered</span> and
      <span class="red"><b>0</b> lines missed.</span>
    </div>
  </div>
  
  <pre>
    <ol>
      
        <li class="never" data-hits="" data-linenumber="1">
          
          
          <code class="ruby"># encoding: utf-8</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="2">
          <span class="hits">1</span>
          
          <code class="ruby">class MapController &lt; ApplicationController</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="3">
          <span class="hits">1</span>
          
          <code class="ruby">  skip_before_filter :verify_authenticity_token, :only =&gt; [:wms, :wfs]</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="4">
          <span class="hits">1</span>
          
          <code class="ruby">  before_filter :login_required</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="5">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="6">
          
          
          <code class="ruby">  # map_controller method that shows the main map interface.</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="7">
          
          
          <code class="ruby">  #</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="8">
          
          
          <code class="ruby">  # Also serves as the root_path of the app.</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="9">
          
          
          <code class="ruby">  #</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="10">
          <span class="hits">1</span>
          
          <code class="ruby">  def index</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="11">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="12">
          
          
          <code class="ruby"></code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="13">
          
          
          <code class="ruby">  # map_controller method that handles WMS queries.</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="14">
          
          
          <code class="ruby">  #</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="15">
          
          
          <code class="ruby">  # If the query is HTTP GET the method extracts the query string</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="16">
          
          
          <code class="ruby">  # from the string and passes it to the wmsGet model method.</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="17">
          
          
          <code class="ruby">  #</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="18">
          
          
          <code class="ruby">  # If the query is HTTP POST the method passes the raw post data</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="19">
          
          
          <code class="ruby">  # to the wmsPost model method.</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="20">
          
          
          <code class="ruby">  #</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="21">
          
          
          <code class="ruby">  # The response is rendered as is with 'render :text'.</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="22">
          
          
          <code class="ruby">  #</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="23">
          <span class="hits">1</span>
          
          <code class="ruby">  def wms</code>
        </li>
      
        <li class="covered" data-hits="2" data-linenumber="24">
          <span class="hits">2</span>
          
          <code class="ruby">    query =  request.fullpath.gsub(/\A\/map\/wms\?/, '')</code>
        </li>
      
        <li class="covered" data-hits="2" data-linenumber="25">
          <span class="hits">2</span>
          
          <code class="ruby">    if request.post?</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="26">
          <span class="hits">1</span>
          
          <code class="ruby">      res = Map.wmsPost(session[:user][:username], session[:user][:password], request.raw_post)</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="27">
          
          
          <code class="ruby">    else</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="28">
          <span class="hits">1</span>
          
          <code class="ruby">      res = Map.wmsGet(session[:user][:username], session[:user][:password], query)</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="29">
          
          
          <code class="ruby">    end</code>
        </li>
      
        <li class="covered" data-hits="2" data-linenumber="30">
          <span class="hits">2</span>
          
          <code class="ruby">    render :text =&gt; res.body, :layout =&gt; false, :content_type =&gt; res.headers['content-type'], :status =&gt; res.code</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="31">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="32">
          
          
          <code class="ruby"></code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="33">
          
          
          <code class="ruby">  # map_controller method that handles WFS queries.</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="34">
          
          
          <code class="ruby">  #</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="35">
          
          
          <code class="ruby">  # If the query is HTTP GET the method extracts the query string</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="36">
          
          
          <code class="ruby">  # from the string and passes it to the wfsGet model method.</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="37">
          
          
          <code class="ruby">  #</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="38">
          
          
          <code class="ruby">  # If the query is HTTP POST the method passes the raw post data</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="39">
          
          
          <code class="ruby">  # to the wfsPost model method.</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="40">
          
          
          <code class="ruby">  #</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="41">
          
          
          <code class="ruby">  # The response is rendered as is with 'render :text'.</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="42">
          
          
          <code class="ruby">  #</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="43">
          <span class="hits">1</span>
          
          <code class="ruby">  def wfs</code>
        </li>
      
        <li class="covered" data-hits="2" data-linenumber="44">
          <span class="hits">2</span>
          
          <code class="ruby">    query =  request.fullpath.gsub(/\A\/map\/wfs\?/, '')</code>
        </li>
      
        <li class="covered" data-hits="2" data-linenumber="45">
          <span class="hits">2</span>
          
          <code class="ruby">    if request.post?</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="46">
          <span class="hits">1</span>
          
          <code class="ruby">      res = Map.wfsPost(session[:user][:username], session[:user][:password], request.raw_post)</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="47">
          
          
          <code class="ruby">    else</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="48">
          <span class="hits">1</span>
          
          <code class="ruby">      res = Map.wfsGet(session[:user][:username], session[:user][:password], query)</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="49">
          
          
          <code class="ruby">    end</code>
        </li>
      
        <li class="covered" data-hits="2" data-linenumber="50">
          <span class="hits">2</span>
          
          <code class="ruby">    render :text =&gt; res.body, :layout =&gt; false, :content_type =&gt; res.headers['content-type'], :status =&gt; res.code</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="51">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="52">
          
          
          <code class="ruby">end</code>
        </li>
      
    </ol>
  </pre>
</div>
      
        <div class="source_table" id="357a9666e5febe46d69575f07212eee8368db205">
  <div class="header">
    <h3>app/controllers/municipalities_controller.rb</h3>
    <h4><span class="green">100.0 %</span> covered</h4>
    <div>
      <b>6</b> relevant lines. 
      <span class="green"><b>6</b> lines covered</span> and
      <span class="red"><b>0</b> lines missed.</span>
    </div>
  </div>
  
  <pre>
    <ol>
      
        <li class="never" data-hits="" data-linenumber="1">
          
          
          <code class="ruby"># encoding: utf-8</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="2">
          <span class="hits">1</span>
          
          <code class="ruby">class MunicipalitiesController &lt; ApplicationController</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="3">
          <span class="hits">1</span>
          
          <code class="ruby">  before_filter :login_required</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="4">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="5">
          <span class="hits">1</span>
          
          <code class="ruby">  def index</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="6">
          <span class="hits">1</span>
          
          <code class="ruby">    render :json =&gt; Municipality.find(:all)</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="7">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="8">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="9">
          <span class="hits">1</span>
          
          <code class="ruby">  def show</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="10">
          <span class="hits">1</span>
          
          <code class="ruby">    render :json =&gt; Municipality.find_by_code(params[:code])</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="11">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="12">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="13">
          
          
          <code class="ruby">end</code>
        </li>
      
    </ol>
  </pre>
</div>
      
        <div class="source_table" id="f86083fd2a6b29b918f81292ea2dedbfd9ea652d">
  <div class="header">
    <h3>app/controllers/provinces_controller.rb</h3>
    <h4><span class="green">100.0 %</span> covered</h4>
    <div>
      <b>6</b> relevant lines. 
      <span class="green"><b>6</b> lines covered</span> and
      <span class="red"><b>0</b> lines missed.</span>
    </div>
  </div>
  
  <pre>
    <ol>
      
        <li class="never" data-hits="" data-linenumber="1">
          
          
          <code class="ruby"># encoding: utf-8</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="2">
          <span class="hits">1</span>
          
          <code class="ruby">class ProvincesController &lt; ApplicationController</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="3">
          <span class="hits">1</span>
          
          <code class="ruby">  before_filter :login_required</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="4">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="5">
          <span class="hits">1</span>
          
          <code class="ruby">  def index</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="6">
          <span class="hits">1</span>
          
          <code class="ruby">    render :json =&gt; Province.find(:all)</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="7">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="8">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="9">
          <span class="hits">1</span>
          
          <code class="ruby">  def show</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="10">
          <span class="hits">1</span>
          
          <code class="ruby">    render :json =&gt; Province.find_by_code(params[:code])</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="11">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="12">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="13">
          
          
          <code class="ruby">end</code>
        </li>
      
    </ol>
  </pre>
</div>
      
        <div class="source_table" id="6fc2142f0ce298ac8f0c142183bf04f3983dd222">
  <div class="header">
    <h3>app/controllers/regions_controller.rb</h3>
    <h4><span class="green">100.0 %</span> covered</h4>
    <div>
      <b>6</b> relevant lines. 
      <span class="green"><b>6</b> lines covered</span> and
      <span class="red"><b>0</b> lines missed.</span>
    </div>
  </div>
  
  <pre>
    <ol>
      
        <li class="never" data-hits="" data-linenumber="1">
          
          
          <code class="ruby"># encoding: utf-8</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="2">
          <span class="hits">1</span>
          
          <code class="ruby">class RegionsController &lt; ApplicationController</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="3">
          <span class="hits">1</span>
          
          <code class="ruby">  before_filter :login_required</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="4">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="5">
          <span class="hits">1</span>
          
          <code class="ruby">  def index</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="6">
          <span class="hits">1</span>
          
          <code class="ruby">    render :json =&gt; Region.find(:all)</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="7">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="8">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="9">
          <span class="hits">1</span>
          
          <code class="ruby">  def show</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="10">
          <span class="hits">1</span>
          
          <code class="ruby">    render :json =&gt; Region.find_by_code(params[:code])</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="11">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="12">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="13">
          
          
          <code class="ruby">end</code>
        </li>
      
    </ol>
  </pre>
</div>
      
        <div class="source_table" id="442279855a6add3cf52a99f66dfdf647d2ddcaa7">
  <div class="header">
    <h3>app/controllers/scale_relevancies_controller.rb</h3>
    <h4><span class="green">100.0 %</span> covered</h4>
    <div>
      <b>6</b> relevant lines. 
      <span class="green"><b>6</b> lines covered</span> and
      <span class="red"><b>0</b> lines missed.</span>
    </div>
  </div>
  
  <pre>
    <ol>
      
        <li class="never" data-hits="" data-linenumber="1">
          
          
          <code class="ruby"># encoding: utf-8</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="2">
          <span class="hits">1</span>
          
          <code class="ruby">class ScaleRelevanciesController &lt; ApplicationController</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="3">
          <span class="hits">1</span>
          
          <code class="ruby">  before_filter :login_required</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="4">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="5">
          <span class="hits">1</span>
          
          <code class="ruby">  def index</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="6">
          <span class="hits">1</span>
          
          <code class="ruby">    render :json =&gt; ScaleRelevancy.find(:all)</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="7">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="8">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="9">
          <span class="hits">1</span>
          
          <code class="ruby">  def show</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="10">
          <span class="hits">1</span>
          
          <code class="ruby">    render :json =&gt; ScaleRelevancy.find_by_code(params[:code])</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="11">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="12">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="13">
          
          
          <code class="ruby">end</code>
        </li>
      
    </ol>
  </pre>
</div>
      
        <div class="source_table" id="420c5d1318edace5720992d9fb98b1b65c3689c0">
  <div class="header">
    <h3>app/controllers/users_controller.rb</h3>
    <h4><span class="green">100.0 %</span> covered</h4>
    <div>
      <b>15</b> relevant lines. 
      <span class="green"><b>15</b> lines covered</span> and
      <span class="red"><b>0</b> lines missed.</span>
    </div>
  </div>
  
  <pre>
    <ol>
      
        <li class="never" data-hits="" data-linenumber="1">
          
          
          <code class="ruby"># encoding: utf-8</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="2">
          <span class="hits">1</span>
          
          <code class="ruby">class UsersController &lt; ApplicationController</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="3">
          
          
          <code class="ruby"></code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="4">
          
          
          <code class="ruby">  # users_controller method for handling logins.</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="5">
          
          
          <code class="ruby">  #</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="6">
          
          
          <code class="ruby">  # POST data params[:username] and params[:password] are</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="7">
          
          
          <code class="ruby">  # passed to the User model method that handles the authentication.</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="8">
          
          
          <code class="ruby">  #</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="9">
          
          
          <code class="ruby">  # Upon successful authentication we store the credentials to</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="10">
          
          
          <code class="ruby">  # session[:user] hash and redirect to root_path.</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="11">
          
          
          <code class="ruby">  #</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="12">
          <span class="hits">1</span>
          
          <code class="ruby">  def login</code>
        </li>
      
        <li class="covered" data-hits="5" data-linenumber="13">
          <span class="hits">5</span>
          
          <code class="ruby">    if request.post?</code>
        </li>
      
        <li class="covered" data-hits="3" data-linenumber="14">
          <span class="hits">3</span>
          
          <code class="ruby">      if session[:user] = User.authenticate(params[:username], params[:password])</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="15">
          <span class="hits">1</span>
          
          <code class="ruby">        session[:user][:username] = params[:username]</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="16">
          <span class="hits">1</span>
          
          <code class="ruby">        session[:user][:password] = params[:password]</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="17">
          
          
          <code class="ruby">        # flash[:notice] = 'Kirjautuminen onnistui'</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="18">
          <span class="hits">1</span>
          
          <code class="ruby">        redirect_to root_path</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="19">
          
          
          <code class="ruby">      else</code>
        </li>
      
        <li class="covered" data-hits="2" data-linenumber="20">
          <span class="hits">2</span>
          
          <code class="ruby">        flash[:notice] = 'Kirjautuminen ei onnistunut'</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="21">
          
          
          <code class="ruby">      end</code>
        </li>
      
        <li class="covered" data-hits="2" data-linenumber="22">
          <span class="hits">2</span>
          
          <code class="ruby">    elsif session[:user] != nil</code>
        </li>
      
        <li class="covered" data-hits="2" data-linenumber="23">
          <span class="hits">2</span>
          
          <code class="ruby">      flash[:notice] = 'Kirjaudu ensin ulos'</code>
        </li>
      
        <li class="covered" data-hits="2" data-linenumber="24">
          <span class="hits">2</span>
          
          <code class="ruby">      redirect_to root_path</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="25">
          
          
          <code class="ruby">    end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="26">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="27">
          
          
          <code class="ruby"></code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="28">
          
          
          <code class="ruby">  # users_controller method for handling logouts.</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="29">
          
          
          <code class="ruby">  #</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="30">
          
          
          <code class="ruby">  # session[:user] hash is cleared and user redirected</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="31">
          
          
          <code class="ruby">  # to the login page.</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="32">
          
          
          <code class="ruby">  #</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="33">
          <span class="hits">1</span>
          
          <code class="ruby">  def logout</code>
        </li>
      
        <li class="covered" data-hits="3" data-linenumber="34">
          <span class="hits">3</span>
          
          <code class="ruby">    session[:user] = nil</code>
        </li>
      
        <li class="covered" data-hits="3" data-linenumber="35">
          <span class="hits">3</span>
          
          <code class="ruby">    flash[:notice] = 'Kirjauduit ulos'</code>
        </li>
      
        <li class="covered" data-hits="3" data-linenumber="36">
          <span class="hits">3</span>
          
          <code class="ruby">    redirect_to :action =&gt; 'login'</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="37">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="38">
          
          
          <code class="ruby">end</code>
        </li>
      
    </ol>
  </pre>
</div>
      
        <div class="source_table" id="b6faa01126cef4f4f053178ad236af92069a8e56">
  <div class="header">
    <h3>app/helpers/application_helper.rb</h3>
    <h4><span class="green">100.0 %</span> covered</h4>
    <div>
      <b>1</b> relevant lines. 
      <span class="green"><b>1</b> lines covered</span> and
      <span class="red"><b>0</b> lines missed.</span>
    </div>
  </div>
  
  <pre>
    <ol>
      
        <li class="covered" data-hits="1" data-linenumber="1">
          <span class="hits">1</span>
          
          <code class="ruby">module ApplicationHelper</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="2">
          
          
          <code class="ruby">end</code>
        </li>
      
    </ol>
  </pre>
</div>
      
        <div class="source_table" id="c7ab2a10e1adfaae530850570c7be0829df73a61">
  <div class="header">
    <h3>app/helpers/map_helper.rb</h3>
    <h4><span class="green">100.0 %</span> covered</h4>
    <div>
      <b>1</b> relevant lines. 
      <span class="green"><b>1</b> lines covered</span> and
      <span class="red"><b>0</b> lines missed.</span>
    </div>
  </div>
  
  <pre>
    <ol>
      
        <li class="covered" data-hits="1" data-linenumber="1">
          <span class="hits">1</span>
          
          <code class="ruby">module MapHelper</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="2">
          
          
          <code class="ruby">end</code>
        </li>
      
    </ol>
  </pre>
</div>
      
        <div class="source_table" id="4882085e53b7c5993f10349d12875ef49c07c3a5">
  <div class="header">
    <h3>app/helpers/users_helper.rb</h3>
    <h4><span class="green">100.0 %</span> covered</h4>
    <div>
      <b>1</b> relevant lines. 
      <span class="green"><b>1</b> lines covered</span> and
      <span class="red"><b>0</b> lines missed.</span>
    </div>
  </div>
  
  <pre>
    <ol>
      
        <li class="covered" data-hits="1" data-linenumber="1">
          <span class="hits">1</span>
          
          <code class="ruby">module UsersHelper</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="2">
          
          
          <code class="ruby">end</code>
        </li>
      
    </ol>
  </pre>
</div>
      
        <div class="source_table" id="6637756de2289dfe4b5c617b7e476d044d4d3eec">
  <div class="header">
    <h3>app/models/county.rb</h3>
    <h4><span class="green">100.0 %</span> covered</h4>
    <div>
      <b>5</b> relevant lines. 
      <span class="green"><b>5</b> lines covered</span> and
      <span class="red"><b>0</b> lines missed.</span>
    </div>
  </div>
  
  <pre>
    <ol>
      
        <li class="never" data-hits="" data-linenumber="1">
          
          
          <code class="ruby"># encoding: utf-8</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="2">
          
          
          <code class="ruby"># Model for holding county (maakunta) codes and descriptions</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="3">
          <span class="hits">1</span>
          
          <code class="ruby">class County &lt; ActiveRecord::Base</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="4">
          <span class="hits">1</span>
          
          <code class="ruby">  attr_accessible :code, :description_fin, :description_swe, :description_eng</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="5">
          <span class="hits">1</span>
          
          <code class="ruby">  validates_uniqueness_of :code</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="6">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="7">
          <span class="hits">1</span>
          
          <code class="ruby">  def as_json(options={})</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="8">
          <span class="hits">1</span>
          
          <code class="ruby">    {self.code =&gt; {:fin =&gt; self.description_fin, :swe =&gt; self.description_swe, :eng =&gt; self.description_eng}}</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="9">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="10">
          
          
          <code class="ruby">end</code>
        </li>
      
    </ol>
  </pre>
</div>
      
        <div class="source_table" id="441212cc5ddbc88fe358f58e08d4eabcd45861db">
  <div class="header">
    <h3>app/models/greater_area.rb</h3>
    <h4><span class="green">100.0 %</span> covered</h4>
    <div>
      <b>5</b> relevant lines. 
      <span class="green"><b>5</b> lines covered</span> and
      <span class="red"><b>0</b> lines missed.</span>
    </div>
  </div>
  
  <pre>
    <ol>
      
        <li class="never" data-hits="" data-linenumber="1">
          
          
          <code class="ruby"># encoding: utf-8</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="2">
          
          
          <code class="ruby"># Model for holding greater area (suuralue) codes and descriptions</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="3">
          <span class="hits">1</span>
          
          <code class="ruby">class GreaterArea &lt; ActiveRecord::Base</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="4">
          <span class="hits">1</span>
          
          <code class="ruby">  attr_accessible :code, :description_fin, :description_swe, :description_eng</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="5">
          <span class="hits">1</span>
          
          <code class="ruby">  validates_uniqueness_of :code</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="6">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="7">
          <span class="hits">1</span>
          
          <code class="ruby">  def as_json(options={})</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="8">
          <span class="hits">1</span>
          
          <code class="ruby">    {self.code =&gt; {:fin =&gt; self.description_fin, :swe =&gt; self.description_swe, :eng =&gt; self.description_eng}}</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="9">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="10">
          
          
          <code class="ruby">end</code>
        </li>
      
    </ol>
  </pre>
</div>
      
        <div class="source_table" id="9488a79c83eba99ceae78a6f66047493b047cd1d">
  <div class="header">
    <h3>app/models/language.rb</h3>
    <h4><span class="green">100.0 %</span> covered</h4>
    <div>
      <b>5</b> relevant lines. 
      <span class="green"><b>5</b> lines covered</span> and
      <span class="red"><b>0</b> lines missed.</span>
    </div>
  </div>
  
  <pre>
    <ol>
      
        <li class="never" data-hits="" data-linenumber="1">
          
          
          <code class="ruby"># encoding: utf-8</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="2">
          
          
          <code class="ruby"># Model for holding language (kieli) codes and descriptions</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="3">
          <span class="hits">1</span>
          
          <code class="ruby">class Language &lt; ActiveRecord::Base</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="4">
          <span class="hits">1</span>
          
          <code class="ruby">  attr_accessible :code, :description_fin, :description_swe, :description_eng</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="5">
          <span class="hits">1</span>
          
          <code class="ruby">  validates_uniqueness_of :code</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="6">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="7">
          <span class="hits">1</span>
          
          <code class="ruby">  def as_json(options={})</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="8">
          <span class="hits">1</span>
          
          <code class="ruby">    {self.code =&gt; {:fin =&gt; self.description_fin, :swe =&gt; self.description_swe, :eng =&gt; self.description_eng}}</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="9">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="10">
          
          
          <code class="ruby">end</code>
        </li>
      
    </ol>
  </pre>
</div>
      
        <div class="source_table" id="8b76b2e472f39404243fea1999cee6174931a274">
  <div class="header">
    <h3>app/models/language_majority.rb</h3>
    <h4><span class="green">100.0 %</span> covered</h4>
    <div>
      <b>5</b> relevant lines. 
      <span class="green"><b>5</b> lines covered</span> and
      <span class="red"><b>0</b> lines missed.</span>
    </div>
  </div>
  
  <pre>
    <ol>
      
        <li class="never" data-hits="" data-linenumber="1">
          
          
          <code class="ruby"># encoding: utf-8</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="2">
          
          
          <code class="ruby"># Model for holding language majority (kielienemmisto) codes and descriptions</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="3">
          <span class="hits">1</span>
          
          <code class="ruby">class LanguageMajority &lt; ActiveRecord::Base</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="4">
          <span class="hits">1</span>
          
          <code class="ruby">  attr_accessible :code, :description_fin, :description_swe, :description_eng</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="5">
          <span class="hits">1</span>
          
          <code class="ruby">  validates_uniqueness_of :code</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="6">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="7">
          <span class="hits">1</span>
          
          <code class="ruby">  def as_json(options={})</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="8">
          <span class="hits">1</span>
          
          <code class="ruby">    {self.code =&gt; {:fin =&gt; self.description_fin, :swe =&gt; self.description_swe, :eng =&gt; self.description_eng}}</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="9">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="10">
          
          
          <code class="ruby">end</code>
        </li>
      
    </ol>
  </pre>
</div>
      
        <div class="source_table" id="d0cdde89986ca41d4061d273ae616a243fe2b833">
  <div class="header">
    <h3>app/models/language_officiality.rb</h3>
    <h4><span class="green">100.0 %</span> covered</h4>
    <div>
      <b>5</b> relevant lines. 
      <span class="green"><b>5</b> lines covered</span> and
      <span class="red"><b>0</b> lines missed.</span>
    </div>
  </div>
  
  <pre>
    <ol>
      
        <li class="never" data-hits="" data-linenumber="1">
          
          
          <code class="ruby"># encoding: utf-8</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="2">
          
          
          <code class="ruby"># Model for holding language officiality (kielivirallisuus) codes and descriptions</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="3">
          <span class="hits">1</span>
          
          <code class="ruby">class LanguageOfficiality &lt; ActiveRecord::Base</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="4">
          <span class="hits">1</span>
          
          <code class="ruby">  attr_accessible :code, :description_fin, :description_swe, :description_eng</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="5">
          <span class="hits">1</span>
          
          <code class="ruby">  validates_uniqueness_of :code</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="6">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="7">
          <span class="hits">1</span>
          
          <code class="ruby">  def as_json(options={})</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="8">
          <span class="hits">1</span>
          
          <code class="ruby">    {self.code =&gt; {:fin =&gt; self.description_fin, :swe =&gt; self.description_swe, :eng =&gt; self.description_eng}}</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="9">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="10">
          
          
          <code class="ruby">end</code>
        </li>
      
    </ol>
  </pre>
</div>
      
        <div class="source_table" id="26289cb96c18dc2d5ce9f6559610aa347b0ef2d8">
  <div class="header">
    <h3>app/models/location.rb</h3>
    <h4><span class="green">100.0 %</span> covered</h4>
    <div>
      <b>9</b> relevant lines. 
      <span class="green"><b>9</b> lines covered</span> and
      <span class="red"><b>0</b> lines missed.</span>
    </div>
  </div>
  
  <pre>
    <ol>
      
        <li class="never" data-hits="" data-linenumber="1">
          
          
          <code class="ruby"># encoding: utf-8</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="2">
          <span class="hits">1</span>
          
          <code class="ruby">class Location &lt; ActiveRecord::Base</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="3">
          <span class="hits">1</span>
          
          <code class="ruby">  attr_accessible :name, :search_name</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="4">
          <span class="hits">1</span>
          
          <code class="ruby">  validates_uniqueness_of :name</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="5">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="6">
          
          
          <code class="ruby">  # Searches the search_name column</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="7">
          
          
          <code class="ruby">  #</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="8">
          
          
          <code class="ruby">  # * *Args*    :</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="9">
          
          
          <code class="ruby">  #   - +term+ -&gt; the search term</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="10">
          
          
          <code class="ruby">  # * *Returns* :</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="11">
          
          
          <code class="ruby">  #   - 50 first locations that matches the search term</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="12">
          
          
          <code class="ruby">  #</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="13">
          <span class="hits">1</span>
          
          <code class="ruby">  def self.search(term)</code>
        </li>
      
        <li class="covered" data-hits="5" data-linenumber="14">
          <span class="hits">5</span>
          
          <code class="ruby">    if term</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="15">
          
          
          <code class="ruby">      # scanning for the wild cards, that is for the '*' symbols</code>
        </li>
      
        <li class="covered" data-hits="20" data-linenumber="16">
          <span class="hits">20</span>
          
          <code class="ruby">      wild_card_term = term.scan(/^(\*?)([^*%?]*)(\*?)$/).flatten.collect {|t| t.gsub(&quot;*&quot;, &quot;%&quot;)}</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="17">
          
          
          <code class="ruby">      # for the fuzzy search, we need to replace special characters with characters from the latin alphabet</code>
        </li>
      
        <li class="covered" data-hits="5" data-linenumber="18">
          <span class="hits">5</span>
          
          <code class="ruby">      wild_card_term[1] = wild_card_term[1].fuzzify</code>
        </li>
      
        <li class="covered" data-hits="5" data-linenumber="19">
          <span class="hits">5</span>
          
          <code class="ruby">      search_term = wild_card_term.join</code>
        </li>
      
        <li class="covered" data-hits="5" data-linenumber="20">
          <span class="hits">5</span>
          
          <code class="ruby">      find(:all, :conditions =&gt; ['search_name LIKE ?', search_term], :limit =&gt; 50)</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="21">
          
          
          <code class="ruby">    else</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="22">
          
          
          <code class="ruby">      nil</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="23">
          
          
          <code class="ruby">    end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="24">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="25">
          
          
          <code class="ruby">end</code>
        </li>
      
    </ol>
  </pre>
</div>
      
        <div class="source_table" id="c8db459fd16571c7df5d8f3af0fead28000d11c3">
  <div class="header">
    <h3>app/models/location_type.rb</h3>
    <h4><span class="green">100.0 %</span> covered</h4>
    <div>
      <b>5</b> relevant lines. 
      <span class="green"><b>5</b> lines covered</span> and
      <span class="red"><b>0</b> lines missed.</span>
    </div>
  </div>
  
  <pre>
    <ol>
      
        <li class="never" data-hits="" data-linenumber="1">
          
          
          <code class="ruby"># encoding: utf-8</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="2">
          
          
          <code class="ruby"># Model for holding location type (paikkatyyppi) codes and descriptions</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="3">
          <span class="hits">1</span>
          
          <code class="ruby">class LocationType &lt; ActiveRecord::Base</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="4">
          <span class="hits">1</span>
          
          <code class="ruby">  attr_accessible :code, :description_fin, :description_swe, :description_eng</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="5">
          <span class="hits">1</span>
          
          <code class="ruby">  validates_uniqueness_of :code</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="6">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="7">
          <span class="hits">1</span>
          
          <code class="ruby">  def as_json(options={})</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="8">
          <span class="hits">1</span>
          
          <code class="ruby">    {self.code =&gt; {:fin =&gt; self.description_fin, :swe =&gt; self.description_swe, :eng =&gt; self.description_eng}}</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="9">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="10">
          
          
          <code class="ruby">end</code>
        </li>
      
    </ol>
  </pre>
</div>
      
        <div class="source_table" id="c816078b8b2c3b22e03c12760ca5089df05311b1">
  <div class="header">
    <h3>app/models/location_type_group.rb</h3>
    <h4><span class="green">100.0 %</span> covered</h4>
    <div>
      <b>5</b> relevant lines. 
      <span class="green"><b>5</b> lines covered</span> and
      <span class="red"><b>0</b> lines missed.</span>
    </div>
  </div>
  
  <pre>
    <ol>
      
        <li class="never" data-hits="" data-linenumber="1">
          
          
          <code class="ruby"># encoding: utf-8</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="2">
          
          
          <code class="ruby"># Model for holding location type group (paikkatyyppiryhma) codes and descriptions</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="3">
          <span class="hits">1</span>
          
          <code class="ruby">class LocationTypeGroup &lt; ActiveRecord::Base</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="4">
          <span class="hits">1</span>
          
          <code class="ruby">  attr_accessible :code, :description_fin, :description_swe, :description_eng</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="5">
          <span class="hits">1</span>
          
          <code class="ruby">  validates_uniqueness_of :code</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="6">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="7">
          <span class="hits">1</span>
          
          <code class="ruby">  def as_json(options={})</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="8">
          <span class="hits">1</span>
          
          <code class="ruby">    {self.code =&gt; {:fin =&gt; self.description_fin, :swe =&gt; self.description_swe, :eng =&gt; self.description_eng}}</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="9">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="10">
          
          
          <code class="ruby">end</code>
        </li>
      
    </ol>
  </pre>
</div>
      
        <div class="source_table" id="4eeddf60b977df42c4ec0353ac1e07411dc146ed">
  <div class="header">
    <h3>app/models/location_type_subgroup.rb</h3>
    <h4><span class="green">100.0 %</span> covered</h4>
    <div>
      <b>5</b> relevant lines. 
      <span class="green"><b>5</b> lines covered</span> and
      <span class="red"><b>0</b> lines missed.</span>
    </div>
  </div>
  
  <pre>
    <ol>
      
        <li class="never" data-hits="" data-linenumber="1">
          
          
          <code class="ruby"># encoding: utf-8</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="2">
          
          
          <code class="ruby"># Model for holding location type subgroup (paikkatyyppialaryhma) codes and descriptions</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="3">
          <span class="hits">1</span>
          
          <code class="ruby">class LocationTypeSubgroup &lt; ActiveRecord::Base</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="4">
          <span class="hits">1</span>
          
          <code class="ruby">  attr_accessible :code, :description_fin, :description_swe, :description_eng</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="5">
          <span class="hits">1</span>
          
          <code class="ruby">  validates_uniqueness_of :code</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="6">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="7">
          <span class="hits">1</span>
          
          <code class="ruby">  def as_json(options={})</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="8">
          <span class="hits">1</span>
          
          <code class="ruby">    {self.code =&gt; {:fin =&gt; self.description_fin, :swe =&gt; self.description_swe, :eng =&gt; self.description_eng}}</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="9">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="10">
          
          
          <code class="ruby">end</code>
        </li>
      
    </ol>
  </pre>
</div>
      
        <div class="source_table" id="de9ee54134becfe613708d23505bfcd50f5e4d95">
  <div class="header">
    <h3>app/models/map.rb</h3>
    <h4><span class="green">100.0 %</span> covered</h4>
    <div>
      <b>15</b> relevant lines. 
      <span class="green"><b>15</b> lines covered</span> and
      <span class="red"><b>0</b> lines missed.</span>
    </div>
  </div>
  
  <pre>
    <ol>
      
        <li class="never" data-hits="" data-linenumber="1">
          
          
          <code class="ruby"># encoding: utf-8</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="2">
          
          
          <code class="ruby"># Model for handling WMS/WFS query proxying</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="3">
          <span class="hits">1</span>
          
          <code class="ruby">class Map &lt; ActiveRecord::Base</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="4">
          
          
          <code class="ruby"></code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="5">
          
          
          <code class="ruby">  # Proxies WMS GET query to NLS API</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="6">
          
          
          <code class="ruby">  #</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="7">
          
          
          <code class="ruby">  # * *Args*    :</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="8">
          
          
          <code class="ruby">  #   - +user+ -&gt; API username</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="9">
          
          
          <code class="ruby">  #   - +pass+ -&gt; API password</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="10">
          
          
          <code class="ruby">  #   - +query+ -&gt; GET query string</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="11">
          
          
          <code class="ruby">  # * *Returns* :</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="12">
          
          
          <code class="ruby">  #   - HTTP response from NLS API</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="13">
          
          
          <code class="ruby">  #</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="14">
          <span class="hits">1</span>
          
          <code class="ruby">  def self.wmsGet(user, pass, query)</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="15">
          <span class="hits">1</span>
          
          <code class="ruby">    auth = {:username =&gt; user, :password =&gt; pass}</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="16">
          <span class="hits">1</span>
          
          <code class="ruby">    res = HTTParty.get('https://ws.nls.fi/rasteriaineistot/image?'+query, :basic_auth =&gt; auth)</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="17">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="18">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="19">
          
          
          <code class="ruby">  # Proxies WMS POST query to NLS API</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="20">
          
          
          <code class="ruby">  #</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="21">
          
          
          <code class="ruby">  # * *Args*    :</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="22">
          
          
          <code class="ruby">  #   - +user+ -&gt; API username</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="23">
          
          
          <code class="ruby">  #   - +pass+ -&gt; API password</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="24">
          
          
          <code class="ruby">  #   - +post_data+ -&gt; POST data to be submitted</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="25">
          
          
          <code class="ruby">  # * *Returns* :</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="26">
          
          
          <code class="ruby">  #   - HTTP response from NLS API</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="27">
          
          
          <code class="ruby">  #</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="28">
          <span class="hits">1</span>
          
          <code class="ruby">  def self.wmsPost(user, pass, post_data)</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="29">
          <span class="hits">1</span>
          
          <code class="ruby">    auth = { :username =&gt; user, :password =&gt; pass }</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="30">
          <span class="hits">1</span>
          
          <code class="ruby">    options = { :body =&gt; post_data, :basic_auth =&gt; auth }</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="31">
          <span class="hits">1</span>
          
          <code class="ruby">    res = HTTParty.post('https://ws.nls.fi/rasteriaineistot/image?', options)</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="32">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="33">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="34">
          
          
          <code class="ruby">  # Proxies WFS GET query to NLS API</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="35">
          
          
          <code class="ruby">  #</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="36">
          
          
          <code class="ruby">  # * *Args*    :</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="37">
          
          
          <code class="ruby">  #   - +user+ -&gt; API username</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="38">
          
          
          <code class="ruby">  #   - +pass+ -&gt; API password</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="39">
          
          
          <code class="ruby">  #   - +query+ -&gt; GET query string</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="40">
          
          
          <code class="ruby">  # * *Returns* :</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="41">
          
          
          <code class="ruby">  #   - HTTP response from NLS API</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="42">
          
          
          <code class="ruby">  #</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="43">
          <span class="hits">1</span>
          
          <code class="ruby">  def self.wfsGet(user, pass, query)</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="44">
          <span class="hits">1</span>
          
          <code class="ruby">    auth = {:username =&gt; user, :password =&gt; pass}</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="45">
          <span class="hits">1</span>
          
          <code class="ruby">    res = HTTParty.get('https://ws.nls.fi/nimisto/wfs?'+query, :basic_auth =&gt; auth)</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="46">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="47">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="48">
          
          
          <code class="ruby">  # Proxies WFS POST query to NLS API</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="49">
          
          
          <code class="ruby">  #</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="50">
          
          
          <code class="ruby">  # * *Args*    :</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="51">
          
          
          <code class="ruby">  #   - +user+ -&gt; API username</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="52">
          
          
          <code class="ruby">  #   - +pass+ -&gt; API password</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="53">
          
          
          <code class="ruby">  #   - +post_data+ -&gt; POST data to be submitted</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="54">
          
          
          <code class="ruby">  # * *Returns* :</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="55">
          
          
          <code class="ruby">  #   - HTTP response from NLS API</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="56">
          
          
          <code class="ruby">  #</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="57">
          <span class="hits">1</span>
          
          <code class="ruby">  def self.wfsPost(user, pass, post_data)</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="58">
          <span class="hits">1</span>
          
          <code class="ruby">    auth = { :username =&gt; user, :password =&gt; pass }</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="59">
          <span class="hits">1</span>
          
          <code class="ruby">    options = { :body =&gt; post_data, :basic_auth =&gt; auth }</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="60">
          <span class="hits">1</span>
          
          <code class="ruby">    res = HTTParty.post('https://ws.nls.fi/nimisto/wfs?', options)</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="61">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="62">
          
          
          <code class="ruby">end</code>
        </li>
      
    </ol>
  </pre>
</div>
      
        <div class="source_table" id="0c2e40bace65ed582a0f5c29fe039448fcff4542">
  <div class="header">
    <h3>app/models/municipality.rb</h3>
    <h4><span class="green">100.0 %</span> covered</h4>
    <div>
      <b>5</b> relevant lines. 
      <span class="green"><b>5</b> lines covered</span> and
      <span class="red"><b>0</b> lines missed.</span>
    </div>
  </div>
  
  <pre>
    <ol>
      
        <li class="never" data-hits="" data-linenumber="1">
          
          
          <code class="ruby"># encoding: utf-8</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="2">
          
          
          <code class="ruby"># Model for holding municipality (kunta) codes and descriptions</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="3">
          <span class="hits">1</span>
          
          <code class="ruby">class Municipality &lt; ActiveRecord::Base</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="4">
          <span class="hits">1</span>
          
          <code class="ruby">  attr_accessible :code, :description_fin, :description_swe, :description_eng</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="5">
          <span class="hits">1</span>
          
          <code class="ruby">  validates_uniqueness_of :code</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="6">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="7">
          <span class="hits">1</span>
          
          <code class="ruby">  def as_json(options={})</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="8">
          <span class="hits">1</span>
          
          <code class="ruby">    {self.code =&gt; {:fin =&gt; self.description_fin, :swe =&gt; self.description_swe, :eng =&gt; self.description_eng}}</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="9">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="10">
          
          
          <code class="ruby">end</code>
        </li>
      
    </ol>
  </pre>
</div>
      
        <div class="source_table" id="1b68e1432eb8c7765e109dca1a4ace8f81d08689">
  <div class="header">
    <h3>app/models/province.rb</h3>
    <h4><span class="green">100.0 %</span> covered</h4>
    <div>
      <b>5</b> relevant lines. 
      <span class="green"><b>5</b> lines covered</span> and
      <span class="red"><b>0</b> lines missed.</span>
    </div>
  </div>
  
  <pre>
    <ol>
      
        <li class="never" data-hits="" data-linenumber="1">
          
          
          <code class="ruby"># encoding: utf-8</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="2">
          
          
          <code class="ruby"># Model for holding province (laani) codes and descriptions</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="3">
          <span class="hits">1</span>
          
          <code class="ruby">class Province &lt; ActiveRecord::Base</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="4">
          <span class="hits">1</span>
          
          <code class="ruby">  attr_accessible :code, :description_fin, :description_swe, :description_eng</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="5">
          <span class="hits">1</span>
          
          <code class="ruby">  validates_uniqueness_of :code</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="6">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="7">
          <span class="hits">1</span>
          
          <code class="ruby">  def as_json(options={})</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="8">
          <span class="hits">1</span>
          
          <code class="ruby">    {self.code =&gt; {:fin =&gt; self.description_fin, :swe =&gt; self.description_swe, :eng =&gt; self.description_eng}}</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="9">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="10">
          
          
          <code class="ruby">end</code>
        </li>
      
    </ol>
  </pre>
</div>
      
        <div class="source_table" id="e449a24e183afe417626f0aedd413b8f74456e53">
  <div class="header">
    <h3>app/models/region.rb</h3>
    <h4><span class="green">100.0 %</span> covered</h4>
    <div>
      <b>5</b> relevant lines. 
      <span class="green"><b>5</b> lines covered</span> and
      <span class="red"><b>0</b> lines missed.</span>
    </div>
  </div>
  
  <pre>
    <ol>
      
        <li class="never" data-hits="" data-linenumber="1">
          
          
          <code class="ruby"># encoding: utf-8</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="2">
          
          
          <code class="ruby"># Model for holding region (seutukunta) codes and descriptions</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="3">
          <span class="hits">1</span>
          
          <code class="ruby">class Region &lt; ActiveRecord::Base</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="4">
          <span class="hits">1</span>
          
          <code class="ruby">  attr_accessible :code, :description_fin, :description_swe, :description_eng</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="5">
          <span class="hits">1</span>
          
          <code class="ruby">  validates_uniqueness_of :code</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="6">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="7">
          <span class="hits">1</span>
          
          <code class="ruby">  def as_json(options={})</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="8">
          <span class="hits">1</span>
          
          <code class="ruby">    {self.code =&gt; {:fin =&gt; self.description_fin, :swe =&gt; self.description_swe, :eng =&gt; self.description_eng}}</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="9">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="10">
          
          
          <code class="ruby">end</code>
        </li>
      
    </ol>
  </pre>
</div>
      
        <div class="source_table" id="8e2fad185843a091104ef1f41b1a0f49996def29">
  <div class="header">
    <h3>app/models/scale_relevancy.rb</h3>
    <h4><span class="green">100.0 %</span> covered</h4>
    <div>
      <b>5</b> relevant lines. 
      <span class="green"><b>5</b> lines covered</span> and
      <span class="red"><b>0</b> lines missed.</span>
    </div>
  </div>
  
  <pre>
    <ol>
      
        <li class="never" data-hits="" data-linenumber="1">
          
          
          <code class="ruby"># encoding: utf-8</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="2">
          
          
          <code class="ruby"># Model for holding scale relevancy (mittakaavarelevanssi) codes and descriptions</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="3">
          <span class="hits">1</span>
          
          <code class="ruby">class ScaleRelevancy &lt; ActiveRecord::Base</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="4">
          <span class="hits">1</span>
          
          <code class="ruby">  attr_accessible :code, :description_fin, :description_swe, :description_eng</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="5">
          <span class="hits">1</span>
          
          <code class="ruby">  validates_uniqueness_of :code</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="6">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="7">
          <span class="hits">1</span>
          
          <code class="ruby">  def as_json(options={})</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="8">
          <span class="hits">1</span>
          
          <code class="ruby">    {self.code =&gt; {:fin =&gt; self.description_fin, :swe =&gt; self.description_swe, :eng =&gt; self.description_eng}}</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="9">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="10">
          
          
          <code class="ruby">end</code>
        </li>
      
    </ol>
  </pre>
</div>
      
        <div class="source_table" id="733426f752dece529402c33273bc15d991cdacd4">
  <div class="header">
    <h3>app/models/user.rb</h3>
    <h4><span class="green">100.0 %</span> covered</h4>
    <div>
      <b>10</b> relevant lines. 
      <span class="green"><b>10</b> lines covered</span> and
      <span class="red"><b>0</b> lines missed.</span>
    </div>
  </div>
  
  <pre>
    <ol>
      
        <li class="never" data-hits="" data-linenumber="1">
          
          
          <code class="ruby"># encoding: utf-8</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="2">
          
          
          <code class="ruby"># Model for handling user authentication</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="3">
          <span class="hits">1</span>
          
          <code class="ruby">class User &lt; ActiveRecord::Base</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="4">
          <span class="hits">1</span>
          
          <code class="ruby">  attr_accessible :name</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="5">
          <span class="hits">1</span>
          
          <code class="ruby">  validates_uniqueness_of :name</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="6">
          
          
          <code class="ruby">  #TODO confirm username format</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="7">
          <span class="hits">1</span>
          
          <code class="ruby">  validates :name, :format =&gt; /\A[\w]+\z/</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="8">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="9">
          
          
          <code class="ruby">  # Authenticates the user against NLS WFS and WMS APIs</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="10">
          
          
          <code class="ruby">  # * *Args*</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="11">
          
          
          <code class="ruby">  #   - +user+ -&gt; API username</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="12">
          
          
          <code class="ruby">  #   - +pass+ -&gt; API password</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="13">
          
          
          <code class="ruby">  # * *Returns*</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="14">
          
          
          <code class="ruby">  #   - User object if the authentication is successful</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="15">
          
          
          <code class="ruby">  #   - nil if the authentication is not successful</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="16">
          
          
          <code class="ruby">  #</code>
        </li>
      
        <li class="covered" data-hits="1" data-linenumber="17">
          <span class="hits">1</span>
          
          <code class="ruby">  def self.authenticate(user, pass)</code>
        </li>
      
        <li class="covered" data-hits="3" data-linenumber="18">
          <span class="hits">3</span>
          
          <code class="ruby">    auth = {:username =&gt; user, :password =&gt; pass}</code>
        </li>
      
        <li class="covered" data-hits="3" data-linenumber="19">
          <span class="hits">3</span>
          
          <code class="ruby">    rasteri = HTTParty.get('https://ws.nls.fi/rasteriaineistot/', :basic_auth =&gt; auth)</code>
        </li>
      
        <li class="covered" data-hits="3" data-linenumber="20">
          <span class="hits">3</span>
          
          <code class="ruby">    nimisto = HTTParty.get('https://ws.nls.fi/nimisto/', :basic_auth =&gt; auth)</code>
        </li>
      
        <li class="covered" data-hits="3" data-linenumber="21">
          <span class="hits">3</span>
          
          <code class="ruby">    if (rasteri.code == 200 &amp;&amp; nimisto.code == 200)</code>
        </li>
      
        <li class="covered" data-hits="2" data-linenumber="22">
          <span class="hits">2</span>
          
          <code class="ruby">      User.find_by_name(user) || User.create!({:name =&gt; user})</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="23">
          
          
          <code class="ruby">    else</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="24">
          
          
          <code class="ruby">      return nil</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="25">
          
          
          <code class="ruby">    end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="26">
          
          
          <code class="ruby">  end</code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="27">
          
          
          <code class="ruby">  </code>
        </li>
      
        <li class="never" data-hits="" data-linenumber="28">
          
          
          <code class="ruby">end</code>
        </li>
      
    </ol>
  </pre>
</div>
      
      </div>
    </div>
  </body>
</html>
